package com.qc.toutiao.services.Ipml;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.session.SqlSession;

import com.qc.toutiao.dao.CategoryMapper;
import com.qc.toutiao.services.CategoryService;
import com.qc.toutiao.util.SessionUtil;


public class CategoryServiceIpml implements CategoryService{

	
	private SessionUtil sessionUtil = new SessionUtil();
	private CategoryMapper categoryMapper;
	private SqlSession session;
	
	
	public CategoryServiceIpml() {
		session = sessionUtil.getSession();
		categoryMapper = session.getMapper(CategoryMapper.class);
	}



	@Override
	public List<Map<String, Object>> findcategoryALL() {
		List<Map<String, Object>> list = categoryMapper.findcategoryAll();
		sessionUtil.close(session);
		return list;
	}

}
